package com.ldgame.game;

import org.lwjgl.input.Keyboard;
import org.lwjgl.util.vector.Vector2f;
import org.newdawn.slick.Color;

import com.ldgame.gfx.gfxelements.Label;
import com.ldgame.input.Input;

public class HowToState implements GameState {
	Game game;
	private Label l1 = new Label(32.0f, new Color(0.6f, 0.5f, 0.3f, 1.0f));
	private Label l2 = new Label(16.0f, new Color(1.0f, 0.8f, 0.6f, 1.0f));
	
	public HowToState(Game game) {
		this.game = game;
	}
	
	@Override
	public void handleInput() {
		if (Input.checkReleasedKey(Keyboard.KEY_ESCAPE) || Input.checkReleasedMouseBtn(0)) {
			game.setGameState(game.getMenu());
		}
	}

	@Override
	public void calcConfig() {

	}

	@Override
	public void render() {
		l1.render("How to play:", new Vector2f(400.0f, 80.0f));
		l2.render("- WASD to move around         ", new Vector2f(400.0f, 160.0f));
		l2.render("- Left Click to shoot         ", new Vector2f(400.0f, 190.0f));
		l2.render("- Hold down Right Mouse Btn to", new Vector2f(400.0f, 220.0f));
		l2.render("  select units                ", new Vector2f(400.0f, 240.0f));
		l2.render("- Tap Right Mouse Btn to      ", new Vector2f(400.0f, 270.0f));
		l2.render("  release units               ", new Vector2f(400.0f, 290.0f));
		
		l2.render("- Units can capture buildings ", new Vector2f(400.0f, 330.0f));
		l2.render("  by standing close to them   ", new Vector2f(400.0f, 350.0f));
		l2.render("- You can't capture buildings ", new Vector2f(400.0f, 380.0f));
		l2.render("  yourself! You must use your ", new Vector2f(400.0f, 400.0f));
		l2.render("  tiny friends.               ", new Vector2f(400.0f, 420.0f));
		l2.render("- Units can only respawn in   ", new Vector2f(400.0f, 450.0f));
		l2.render("  non-contested cities!       ", new Vector2f(400.0f, 470.0f));
		
		l2.render("Free the tiny planet Donutia", new Vector2f(400.0f, 510.0f));
		l2.render("from the threat of the", new Vector2f(400.0f, 540.0f));
		l2.render("dangerous Tiny Aliens!", new Vector2f(400.0f, 570.0f));
	}

}
